package cn.yanhu.kuwanapp.utils.helper

import android.content.Context
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.widget.TextView
import cn.woochen.comlib.util.ext.dp
import cn.yanhu.kuwanapp.R
import com.hjq.toast.config.IToastStyle

/**
 *
 * 类描述：
 * 创建人：woochen
 * 创建时间：2020/12/15 3:20 PM
 * 修改备注：
 **/
class ToastDarkStyle: IToastStyle<View> {
    override fun createView(context: Context?): View {
        val textView = LayoutInflater.from(context).inflate(R.layout.toast_view, null) as TextView
        textView.id = android.R.id.message
        textView.gravity = gravity
        return textView
    }

    override fun getGravity(): Int {
        return Gravity.BOTTOM
    }

    override fun getYOffset(): Int {
        return 50f.dp.toInt()
    }

}